package cn.fanqinghong.ymcc.feignClient;

import cn.fanqinghong.ymcc.domain.CourseUserLearn;
import cn.fanqinghong.ymcc.result.JSONResult;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * FAN
 * 2022/7/27  18:53
 */
@FeignClient(value = "service-course" , fallbackFactory = CourseUserLearnFallbackFactory.class)
public interface CourseUserLearnFeignClient {

    /**
     * 通过课程id和登陆人id查询数据
     */
    @RequestMapping(value="/courseUserLearn/{courseId}/{loginId}",method= RequestMethod.GET)
    JSONResult searchUserLearn(@PathVariable("courseId")Long courseId, @PathVariable("loginId")Long loginId);

    /**
     * 根据课程id查询订单结算页面的课程相关信息
     * @param courseIds
     * @return
     */
    @RequestMapping(value="/course/info/{courseIds}",method= RequestMethod.GET)
    public JSONResult courseOrderInfo(@PathVariable("courseIds") String courseIds);

}
